export default {
    namespaced: true,
    state: {
        routeName: 0,
        newsList: [],
        loginObj: {},
        hotRank: 0,
        searchList: [],
        sonList: [],
    },
    getters: {},
    mutations: {
        sendNewsList(state, value) {
            state.newsList = value;
            // console.log(value);
        },
        setLoginObj(state, value) {
            state.loginObj = value;
            // console.log(value);
        },
        changeHotList(state, value) {
            state.hotRank = value;
        },
        addSearch(state, value) {
            let dd = state.searchList.findIndex((item) => {
                return item == value;
            });
            if (dd == -1) {
                state.searchList.unshift(value);
            }
        },
        getSonList(state, value) {
            state.sonList = value;
        },
    },
    actions: {},
    modules: {},
};
